package show.lmm.oauth2server.core.view.response;

/**
 * 返回值状态
 */
public enum ResponseCode {
    OK(0, ""),

    USER_LOGIN_ABNORMAL(1001, "用户登录异常"),
    INVALID_SCOPE(1002, "无效的 scope"),
    CLIENT_NOT_EXIST(1003, "客户端不存在"),
    CLIENT_PASSWORD_EMPTY(1004, "客户端密码不能为空"),
    CLIENT_PASSWORD_INCORRECT(1005, "客户端密码错误"),
    UNAUTHORIZED_CLIENT(1006, "未授权的客户端"),
    GRANT_TYPE_EMPTY(1007, "授权类型不能为空"),
    UNSUPPORTED_GRANT_TYPE(1008, "不支持的授权类型"),
    INVALID_GRANT(1009, "无效的授权"),
    AUTHORIZATION_DENIED(1010, "用户授权申请被拒绝");

    private final int code;
    private final String msg;

    ResponseCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
